package CreationMode.Prototype;

/**
 * <h3>23_Design_Patterns</h3>
 * <p></p>
 *
 * @author gdw
 * @since 2025-07-21 15:52:38
 */
public class Realizetype implements Cloneable{

    public Realizetype() {
        System.out.println("构造方法被调用了");
    }

    @Override
    protected Realizetype clone() throws CloneNotSupportedException {
        return (Realizetype) super.clone();
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Realizetype realizetype = new Realizetype();
        System.out.println(realizetype);
        Realizetype clone = realizetype.clone();
        System.out.println(clone);
        System.out.println(clone==realizetype);
    }
}
